import { dateFormat } from '@/util/date';
export const startDate = dateFormat(new Date(), 'yyyy-MM-') + '01';
export const endDate = dateFormat(new Date(), 'yyyy-MM-dd');
export const startDate2 = '';
export const endDate2 = '';
export const tableOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  addBtn: false,
  delBtn: false,
  printBtn: false,
  editBtn:false,
  selection:true,
  emptyBtn:false,
  "column": [
    {
      "type": "input",
      "label": "唯一标识",
      "prop": "id",
      hide: true,
      display: false,
    }, {
      "label": "线路",
      "prop": "lineCode",
      display: false,
      type: 'select',
      search:true,
      props: {
        label: 'name',
        value: 'code'
      },
      cascaderItem: ["stationCode"],
      dicUrl: "/support/swparamline/dict",
    }, {
      "label": "站点",
      "prop": "stationCode",
      display: false,
      type: 'select',
      search:true,
      dicFlag: false,
      props: {
        label: 'name',
        value: 'code'
      },
      dicUrl: "/support/swparamstation/dict/{{key}}",
    }, {
      "type": "input",
      "label": "配送数量【张】",
      "prop": "deliveryCount",
      display: false,
    }, {
      "type": "select",
      "label": "配送人",
      "prop": "deliveryPersonName",
      display: false,
      component: "user-select",
      params: {
        userCodeKey: "deliveryPersonCode"
      }
    }, {
      "type": "input",
      "label": "配送人工号",
      "prop": "deliveryPersonCode",
      display: false,
    },  {
      "type": "select",
      "label": "配送人2",
      "prop": "deliveryPersonTwoName",
      display: false,
      component: "user-select",
      params: {
        userCodeKey: "deliveryPersonTwoCode"
      }
    }, {
      "type": "input",
      "label": "配送人2工号",
      "prop": "deliveryPersonTwoCode",
      display: false,
    },
    {
      "type": "datetime",
      "label": "配送时间",
      "prop": "deliveryTime",
      "format":"yyyy-MM-dd",
      "valueFormat":"yyyy-MM-dd",
      display: false,
    },
    {
      "type": "date",
      "label": "配送时间",
      "prop": "deliveryTimeDTO",
      "format":"yyyy-MM-dd",
      "valueFormat":"yyyy-MM-dd",
      display: false,
      hide: true,
      search: true,
      searchValue: [startDate, endDate],
      searchRange: true,
      searchSpan: 12
    },
    // {
    //   "type": "date",
    //   "label": "配送时间",
    //   "prop": "deliveryTimeDTO",
    //   "format": "yyyy-MM-dd",
    //   "valueFormat": "yyyy-MM-dd",
    //   "search": true,
    //   display: false,
    // },
    {
      "type": "select",
      "label": "数据来源",
      "prop": "dataSource",
      display: false,
      dicData: [{
        label: '人工添加',
        value: '0'
      }, {
        label: '日配送计划',
        value: '1'
      }, {
        label: '临时配送计划',
        value: '2'
      }],
    }, {
      "type": "select",
      "label": "接收人",
      "prop": "receivePersonName",
      display: false,
      component: "user-select",
      params: {
        userCodeKey: "receivePersonCode"
      }
    }, {
      "type": "input",
      "label": "接收人工号",
      "prop": "receivePersonCode",
      display: false,
    }, {
      "type": "input",
      "label": "接收时间",
      "prop": "receiveTime",
      display: false,
    },
    {
      "type": "date",
      "label": "接收时间",
      "prop": "receiveTimeDTO",
      "format":"yyyy-MM-dd",
      "valueFormat":"yyyy-MM-dd",
      display: false,
      hide: true,
      search: true,
      searchslot:true,
      // searchRange: true,
      searchSpan: 12
    }, {
      "type": "input",
      "label": "接收数量【张】",
      "prop": "receiveCount",
      display: false,
    }, {
      "type": "input",
      "label": "差异数量【张】",
      "prop": "differenceCount",
      display: false,
    }, {
      "type": "select",
      "label": "通知状态",
      "prop": "noticeStatus",
      search:true,
      searchValue: '0',
      display: false,
      dicData: [{
        label: '未通知',
        value: '0'
      }, {
        label: '已通知',
        value: '1'
      }],
      //hide:true,
    }, {
      "type": "select",
      "label": "状态",
      "prop": "deliveryStatus",
      display: false,
      dicData: [{
        label: '待确认',
        value: '0'
      }, {
        label: '已确认',
        value: '1'
      }, {
        label: '差异反馈',
        value: '2'
      }, {
        label: '差异申诉',
        value: '3'
      }],
    }, {
    label: '是否入库',
    prop: 'isInstock',
    type: 'select',
    search: true,
    searchLabelWidth: 100,
    dicData: [{
      label: '否',
      value: '0'
    }, {
      label: '是',
      value: '1'
    }],
    display: false
  }, {
    label: '是否出库',
    prop: 'isOutstock',
    type: 'select',
    search: true,
    searchLabelWidth: 100,
    dicData: [{
      label: '否',
      value: '0'
    }, {
      label: '是',
      value: '1'
    }],
    display: false
  },{
      "type": "input",
      "label": "反馈信息",
      "prop": "feedback",
      display: false,
      hide:true,
    }, {
      "type": "input",
      "label": "申诉信息",
      "prop": "complain",
      display: false,
      hide:true,
    }, {
      "type": "textarea",
      "label": "调查结果",
      "prop": "lineSurveyResult",
      display: false,
      hide:true,
    }, {
      "type": "input",
      "label": "部门ID",
      "prop": "deptId",
      hide: true,
      display: false,
    }, {
      "type": "input",
      "label": "创建人ID",
      "prop": "creatorId",
      hide: true,
      display: false,
    }, {
      "type": "input",
      "label": "创建人名称",
      "prop": "creatorName",
      hide: true,
      display: false,
    }, {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      hide: true,
      display: false,
    }, {
      "type": "input",
      "label": "修改时间",
      "prop": "updateTime",
      hide: true,
      display: false,
    }, {
      "type": "input",
      "label": "删除标志",
      "prop": "delFlag",
      hide: true,
      display: false,
    }]
}


export const formAdd = {
  arrow: false,
  submitBtn: false,
  emptyBtn: false,
  "column": [
    {
      "label": "线路",
      "prop": "lineCode",
      type: 'select',
      props: {
        label: 'name',
        value: 'code'
      },
      cascaderItem: ["stationCode"],
      dicUrl: "/support/swparamline/dict",
      rules: [{
        required: true,
        message: '请选择线路'
      }]
    }, {
      "label": "车站",
      "prop": "stationCode",
      type: 'select',
      dicFlag: false,
      props: {
        label: 'name',
        value: 'code'
      },
      dicUrl: "/support/swparamstation/dict/{{key}}",
      rules: [{
        required: true,
        message: '请选择车站'
      }]
    }, {
      "type": "select",
      "label": "配送人",
      "prop": "deliveryPersonName",
      component: "user-select",
      params: {
        userCodeKey: "deliveryPersonCode"
      },
      rules: [{
        required: true,
        message: '请选择配送人'
      }]
    }, {
      "type": "input",
      "label": "配送人工号",
      "prop": "deliveryPersonCode",
      disabled: true,
    }, {
      "type": "select",
      "label": "配送人2",
      "prop": "deliveryPersonTwoName",
      component: "user-select",
      params: {
        userCodeKey: "deliveryPersonTwoCode"
      },
      rules: [{
        required: true,
        message: '请选择配送人2'
      }]
    }, {
      "type": "input",
      "label": "配送人2工号",
      "prop": "deliveryPersonTwoCode",
      disabled: true,
    }, {
      "type": "datetime",
      "label": "配送时间",
      "prop": "deliveryTime",
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      rules: [{
        required: true,
        message: '请选择配送时间'
      }]
    }, {
      "type": "select",
      "label": "数据来源",
      "prop": "dataSource",
      dicData: [{
        label: '人工添加',
        value: '0'
      }, {
        label: '日配送计划',
        value: '1'
      }, {
        label: '临时配送计划',
        value: '2'
      }],
       //disabled:true,
    },]
}

export const formEdit = {
  arrow: false,
  submitBtn: false,
  emptyBtn: false,
  "column": [
    {
      "label": "线路编码",
      "prop": "lineCode",
      type: 'select',
      props: {
        label: 'name',
        value: 'code'
      },
      cascaderItem: ["stationCode"],
      dicUrl: "/support/swparamline/dict",
      rules: [{
        required: true,
        message: '请选择线路'
      }]
    }, {
      "label": "车站编码",
      "prop": "stationCode",
      type: 'select',
      dicFlag: false,
      props: {
        label: 'name',
        value: 'code'
      },
      dicUrl: "/support/swparamstation/dict/{{key}}",
      rules: [{
        required: true,
        message: '请选择车站'
      }]
    }, {
      "type": "select",
      "label": "配送人",
      "prop": "deliveryPersonName",
      component: "user-select",
      params: {
        userCodeKey: "deliveryPersonCode"
      },
      rules: [{
        required: true,
        message: '请选择配送人'
      }]
    }, {
      "type": "input",
      "label": "配送人工号",
      "prop": "deliveryPersonCode",
      disabled: true,
    }, {
      "type": "select",
      "label": "配送人2",
      "prop": "deliveryPersonTwoName",
      component: "user-select",
      params: {
        userCodeKey: "deliveryPersonTwoCode"
      },
      rules: [{
        required: true,
        message: '请选择配送人2'
      }]
    }, {
      "type": "input",
      "label": "配送人2工号",
      "prop": "deliveryPersonTwoCode",
      disabled: true,
    }, {
      "type": "datetime",
      "label": "配送时间",
      "prop": "deliveryTime",
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      rules: [{
        required: true,
        message: '请选择配送时间'
      }]
    }, {
      "type": "select",
      "label": "数据来源",
      "prop": "dataSource",
      dicData: [{
        label: '人工添加',
        value: '0'
      }, {
        label: '日配送计划',
        value: '1'
      }, {
        label: '临时配送计划',
        value: '2'
      }],
      disabeld: true
    },]
}
export const formView = {
  arrow: false,
  submitBtn: false,
  emptyBtn: false,
  detail:true,
  "column": [
    {
      "label": "线路编码",
      "prop": "lineCode",
      type: 'select',
      props: {
        label: 'name',
        value: 'code'
      },
      cascaderItem: ["stationCode"],
      dicUrl: "/support/swparamline/dict",
    }, {
      "label": "车站编码",
      "prop": "stationCode",
      type: 'select',
      dicFlag: false,
      props: {
        label: 'name',
        value: 'code'
      },
      dicUrl: "/support/swparamstation/dict/{{key}}",
    }, {
      "type": "select",
      "label": "配送人",
      "prop": "deliveryPersonName",
      component: "user-select",
      params: {
        userCodeKey: "deliveryPersonCode"
      }
    }, {
      "type": "input",
      "label": "配送人工号",
      "prop": "deliveryPersonCode"
    }, {
      "type": "select",
      "label": "配送人2",
      "prop": "deliveryPersonTwoName",
      component: "user-select",
      params: {
        userCodeKey: "deliveryPersonTwoCode"
      }
    }, {
      "type": "input",
      "label": "配送人2工号",
      "prop": "deliveryPersonTwoCode"
    }, {
      "type": "datetime",
      "label": "配送时间",
      "prop": "deliveryTime",
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
    }, {
      "type": "select",
      "label": "数据来源",
      "prop": "dataSource",
      dicData: [{
        label: '人工添加',
        value: '0'
      }, {
        label: '日配送计划',
        value: '1'
      }, {
        label: '临时配送计划',
        value: '2'
      }]
      , disabeld: true
    },]
}

export const formComplaintSend = {
  arrow: false,
  submitBtn: false,
  emptyBtn: false,
  detail:true,
  "column": [
    {
      "label": "线路编码",
      "prop": "lineCode",
      type: 'select',
      props: {
        label: 'name',
        value: 'code'
      },
      cascaderItem: ["stationCode"],
      dicUrl: "/support/swparamline/dict",
    }, {
      "label": "车站编码",
      "prop": "stationCode",
      type: 'select',
      dicFlag: false,
      props: {
        label: 'name',
        value: 'code'
      },
      dicUrl: "/support/swparamstation/dict/{{key}}",
    }, {
      "type": "select",
      "label": "配送人",
      "prop": "deliveryPersonName",
      component: "user-select",
      params: {
        userCodeKey: "deliveryPersonCode"
      }
    }, {
      "type": "input",
      "label": "配送人工号",
      "prop": "deliveryPersonCode"
    }, {
      "type": "select",
      "label": "配送人2",
      "prop": "deliveryPersonTwoName",
      component: "user-select",
      params: {
        userCodeKey: "deliveryPersonTwoCode"
      }
    }, {
      "type": "input",
      "label": "配送人2工号",
      "prop": "deliveryPersonTwoCode"
    },{
      "type": "datetime",
      "label": "配送时间",
      "prop": "deliveryTime",
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
    }, {
      "type": "select",
      "label": "数据来源",
      "prop": "dataSource",
      dicData: [{
        label: '人工添加',
        value: '0'
      }, {
        label: '日配送计划',
        value: '1'
      }, {
        label: '临时配送计划',
        value: '2'
      }],
    },]
}

export const formComplaintReceive = {
  arrow: false,
  submitBtn: false,
  emptyBtn: false,
  detail: true,
  "column": [
    {
      "type": "select",
      "label": "接收人",
      "prop": "receivePersonName",
      component: "user-select",
      params: {
        userCodeKey: "receivePersonCode"
      }
    }, {
      "type": "input",
      "label": "接收人工号",
      "prop": "receivePersonCode",
    }, {
      "type": "input",
      "label": "接收时间",
      "prop": "receiveTime",
      labelWidth:100,
    },]
}


export const formComplaintReturn = {
  arrow: false,
  submitBtn: false,
  emptyBtn: false,
  "column": [
    {
      "type": "textarea",
      "label": "反馈信息",
      "prop": "feedback",
      disabled: true,
      span: 24,
    }, {
      "type": "textarea",
      "label": "调查结果",
      "prop": "lineSurveyResult",
      span: 24,
    },]
}

export const formComplaintApply = {
  arrow: false,
  submitBtn: false,
  emptyBtn: false,
  "column": [
    {
      "type": "textarea",
      "label": "申诉信息",
      "prop": "complain",
      span: 24,
    },]
}


export const formViewtReturn = {
  arrow: false,
  submitBtn: false,
  emptyBtn: false,
  detail: true,
  "column": [
    {
      "type": "textarea",
      "label": "反馈信息",
      "prop": "feedback",
      disabled: true,
      span: 24,
    }, {
      "type": "textarea",
      "label": "调查结果",
      "prop": "lineSurveyResult",
      span: 24,
    },]
}

export const formViewApply = {
  arrow: false,
  submitBtn: false,
  emptyBtn: false,
  detail: true,
  "column": [
    {
      "type": "textarea",
      "label": "申诉信息",
      "prop": "complain",
      span: 24,
    },]
}
